package com.xiaoshuidi.cloud.module.finance.enums.voucher;

import lombok.Getter;

/**
 * @author dujianguang
 */
@Getter
public enum FinanceVoucherFeeTypeMapperEnum {


    ZUJIN_FEES("租金", "租金"),
    YAJIN_FEES("押金", "押金"),
    YUFUFEI_FEES("预付费", "其他零星收入"),
    RESHUIFEI_FEES("热水费", "其他零星收入"),
    LENGSHUIFEI_FEES("冷水费", "水费"),
    DIANFEI_FEES("电费", "电费"),
    SHUIFEI_FEES("水费", "水费"),
    DIANFEICHONGZHI_FEES("电费充值", "电费"),
    SHUIFEICHONGZHI_FEES("水费充值", "水费"),
    RANQIFEI_FEES("燃气费", "其他零星收入"),
    TINGCHEFEI_FEES("停车费", "其他零星收入"),
    QINGJIEFEI_FEES("清洁费", "其他零星收入"),
    WUYEFEI_FEES("物业费", "其他零星收入"),
    WEIXIUFEI_FEES("维修费", "其他零星收入"),
    GUANLI_FEES("管理费", "管理费"),
    HUANFANGFEI_FEES("换房手续费", "管理费"),
    ZHONGHEFEI_FEES("综合服务费", "管理费"),
    PEICHANGJIN_FEES("赔偿金", "其他零星收入"),
    MENKAYAJIN_FEES("门卡押金", "其他"),
    JIAJUYAJIN_FEES("家具押金", "其他"),
    JIADIANYAJIN_FEES("家电押金", "其他"),
    DINGJIN_FEES("订金", "押金");

    private String feeName;
    private String kdName;


    FinanceVoucherFeeTypeMapperEnum(String feeName, String kdName) {
        this.feeName = feeName;
        this.kdName = kdName;
    }

    public static FinanceVoucherFeeTypeMapperEnum find(String feeName) {
        for (FinanceVoucherFeeTypeMapperEnum value : values()) {
            if(feeName.contains(DIANFEI_FEES.feeName)){
                return DIANFEI_FEES;
            } else if (feeName.contains(SHUIFEI_FEES.feeName)) {
                return SHUIFEI_FEES;
            }else if (value.getFeeName().equals(feeName)) {
                return value;
            }
        }
        return QINGJIEFEI_FEES;
    }

}
